<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.io.*"%>
<%@ page import="xml.response.*"%>
<%@ page import="xml.root"%>
<%@ page import="util.print.printLogCat"%>
<%@ page import="org.sql.table.*"%>
<%@ page import="xml.var"%>
<%@ page import="java.util.Vector"%>
<%@ page import="java.util.Enumeration"%>
<%@ page import="jqgrid.jqgrid"%>
<%@ page import="org.util.getNewData"%>
<%@ page import="requestInterFace.Handle.*"%>
<%@ page import="org.util.SerialNumberUtil"%>
<%@ include file="../../util/paramPrint.jsp" %>
<%@ page trimDirectiveWhitespaces="true" %> 
<%
String Task_Title = request.getParameter("Task_Title");
String Task_Content = request.getParameter("Task_Content");
String Task_Type = request.getParameter("Task_Type");
String Task_AddTime =request.getParameter("Task_AddTime");//产品描述
String Info = request.getParameter("Info");
String User_ID = request.getParameter("User_ID");
String userType=(String)session.getAttribute("User_Type");
String userID=(String)session.getAttribute("User_ID");
root root=new root();
if(userType==null||(!userType.equals("2")&&!userType.equals("1"))){
root.setStatus("false");
root.setMsg("权限不够");
PrintWriter pw = response.getWriter();
pw.println(root.getXmlString());
pw.flush();
return ;
}
    if(Task_Title==null||Task_Title.equals("")){
		root.setStatus("false");
		root.setMsg("请输入标题");
		PrintWriter pw = response.getWriter();
		pw.println(root.getXmlString());
		pw.flush();
		return ;
		}
		
		taskinfo1_1 user=new taskinfo1_1();

		if(Task_Title!=null&&(!Task_Title.equals(""))){
		 user.setInsertField("Task_Title",Task_Title);
		}
		
		if(Task_Content!=null&&(!Task_Content.equals(""))){
		 user.setInsertField("Task_Content", Task_Content);
		}
		
		if(Task_Type!=null&&(!Task_Type.equals(""))){
		 user.setInsertField("Task_Type",Task_Type);
		}
		
		if(Info!=null&&(!Info.equals(""))){
		 user.setInsertField("Info", Info);
		}
		user.setInsertField("Task_AddTime",getNewData.GetNowDateAndTime1());
		if(userType.equals("1")){
		user.setInsertField("User_ID",java.net.URLDecoder.decode(User_ID,"UTF-8"));
		}else if(userType.equals("2")){
		user.setInsertField("User_ID",userID);
		}
		
		int row=user.insert();
		root.setRecords(""+row);//设置当前查询到的记录数
		if(row>0){
			root.setStatus("true");
			root.setMsg("添加成功");
		}else{
			root.setStatus("false");
			root.setMsg("添加失败");
		}
		//printLogCat.printlnWriter(root.getXmlString());
		String rep=root.getXmlString();
%>
<%=rep%>


